<?php
/**
 * Created by PhpStorm.
 * User: Lin
 * Date: 2017/4/8 0008
 * Time: 下午 12:45
 */
Class CheckAction extends CommonAction{

    //显示药师审核列表视图
    public function medicinalList(){
        $where=array(
            'status'=>1,
            'del'=>0
        );
        $goodsArr=M('goods')->where($where)->select();
        $this->goodsArr=$goodsArr;
        $this->display('showList');
    }

    //显示审核管理员审核列表视图
    public function checkedList(){
        $where=array(
            'status'=>2,
            'del'=>0
        );
        $goodsArr=M('goods')->where($where)->select();
        $this->goodsArr=$goodsArr;
        $this->display('showList');
    }

    public function runCheck(){
        $data=array(
            'id'=>$_POST['id'],
            'status'=>$_POST['status'],
        );
        if(M('goods')->save($data)){
            echo true;
        }else{
            echo false;
        }
    }
}